package com.yy.hi.app

import android.app.Application
import com.google.gson.Gson
import com.yy.hi.library.hilog.HiConsolePrinter
import com.yy.hi.library.hilog.HiLogConfig
import com.yy.hi.library.hilog.HiLogManager

/**
 * User: gongyongfeng2@yy.com
 * Date: 2020/6/10 21 :17
 */

class MyApplication : Application() {
    override fun onCreate() {
        super.onCreate()
        HiLogManager.init(object : HiLogConfig() {
            override fun injectJsonParser(): JsonParser {
                return JsonParser { src ->
                    Gson().toJson(src)
                }
            }

            override fun getGlobalTag(): String {
                return "MyApplication"
            }

            override fun enable(): Boolean {
                return true
            }
        }, HiConsolePrinter())
    }
}